home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / Observer.java < prev    next >
Text File  |  1998-09-22  |  1KB  |  39 lines

  1. /*
  2.  * @(#)Observer.java    1.11 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14. package java.util;
  15.  
  16. /**
  17.  * A class can implement the <code>Observer</code> interface when it 
  18.  * wants to be informed of changes in observable objects. 
  19.  *
  20.  * @author  Chris Warth
  21.  * @version 1.11, 07/01/98
  22.  * @see     java.util.Observable
  23.  * @since   JDK1.0
  24.  */
  25. public interface Observer { 
  26.     /**
  27.      * This method is called whenever the observed object is changed. An 
  28.      * application calls an observable object's 
  29.      * <code>notifyObservers</code> method  to have all the object's 
  30.      * observers notified of the change. 
  31.      *
  32.      * @param   o     the observable object.
  33.      * @param   arg   an argument passed to the <code>notifyObservers</code>
  34.      *                 method.
  35.      * @since   JDK1.0
  36.      */
  37.     void update(Observable o, Object arg);
  38. }
  39.